(define A
  (lambda (m n)
    (cond ((= m 0) (+ n 1))
          ((= n 0) (A (- m 1) 1))
          (else (A (- m 1) (A m (- n 1)))))))

;; 获取命令行参数
(define args (command-line))

;; 解析参数
(if (= (length args) 3)
    (let* ((m (string->number (list-ref args 1)))
           (n (string->number (list-ref args 2))))
      (if (and m n)
          (display (A m n))
          (display "请附带两只整数数字参数")))
    (display "命令: scheme --script ackermann.scm <m> <n>"))

(newline)

